package com.aspose.cells;

class zafi extends zbz {
   zafi() {
      this.c(2204);
   }

   void a(PageSetup var1, byte[] var2) throws Exception {
      String var3 = var1.a(true, 0);
      if ("".equals(var3)) {
         var3 = null;
      }

      String var4 = var1.a(false, 0);
      if ("".equals(var4)) {
         var4 = null;
      }

      String var5 = var1.a(true, 2);
      if ("".equals(var5)) {
         var5 = null;
      }

      String var6 = var1.a(false, 2);
      if ("".equals(var6)) {
         var6 = null;
      }

      this.b(38);
      if (var3 != null) {
         this.b(this.d() + (short)(3 + var3.length() * 2));
      }

      if (var4 != null) {
         this.b(this.d() + (short)(3 + var4.length() * 2));
      }

      if (var5 != null) {
         this.b(this.d() + (short)(3 + var5.length() * 2));
      }

      if (var6 != null) {
         this.b(this.d() + (short)(3 + var6.length() * 2));
      }

      this.c = new byte[this.d()];
      this.c[0] = -100;
      this.c[1] = 8;
      if (var2 != null) {
         System.arraycopy(var2, 0, this.c, 12, 16);
      }

      byte var7 = 28;
      this.c[var7] = var1.h();
      int var9 = var7 + 2;
      if (var3 != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var3.length()), 0, this.c, var9, 2);
      }

      var9 += 2;
      if (var4 != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var4.length()), 0, this.c, var9, 2);
      }

      var9 += 2;
      if (var5 != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var5.length()), 0, this.c, var9, 2);
      }

      var9 += 2;
      if (var6 != null) {
         System.arraycopy(com.aspose.cells.b.a.zc.a(var6.length()), 0, this.c, var9, 2);
      }

      var9 += 2;
      int[] var8;
      if (var3 != null) {
         var8 = new int[]{var9};
         this.a(var8, var3);
         var9 = var8[0];
      }

      if (var4 != null) {
         var8 = new int[]{var9};
         this.a(var8, var4);
         var9 = var8[0];
      }

      if (var5 != null) {
         var8 = new int[]{var9};
         this.a(var8, var5);
         var9 = var8[0];
      }

      if (var6 != null) {
         var8 = new int[]{var9};
         this.a(var8, var6);
         var9 = var8[0];
      }

   }

   void a(int[] var1, String var2) throws Exception {
      System.arraycopy(com.aspose.cells.b.a.zc.a(var2.length()), 0, this.c, var1[0], 2);
      var1[0] += 2;
      int var10004 = var1[0];
      int var10001 = var1[0];
      var1[0] = var10004 + 1;
      this.c[var10001] = 1;
      System.arraycopy(Encoding.getUnicode().a(var2), 0, this.c, var1[0], var2.length() * 2);
      var1[0] += var2.length() * 2;
   }
}
